package com.foreveross.bsl.mam.model.rbac.domain;

import java.util.Date;


import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import com.foreveross.bsl.mongodb.domain.Entity;


/**
 * 角色实体
 * <BR>
 * [功能详细描述]
 * @author Amberlo
 * @version [mam-model , 2013-6-20] 
 */
@Document
public class Role extends Entity{
	
	
	/** 角色id */
	@Id
	private String id;
	
	/** 是否有效 */
	@Field("available")
	private boolean available;

	/** 创建时间 */
	@Field("create_time")
	private Date create_time;
	
	/** 修改时间 */
	@Field("modified_at")
	private Date modified_at;
	
	/** 角色名 */
	@Field("rolename")
	@Indexed(unique=true)
	private String rolename;
	
	/** 角色中文名 */
	@Field("name")
    @Indexed(unique = true)
	private String name;
	
	/** 角色类型	 0为应用角色,1为用户组角色*/
	@Field("role_type")
	private Integer roleType;
	
	
	public Integer getRoleType() {
		return roleType;
	}

	public void setRoleType(Integer roleType) {
		this.roleType = roleType;
	}

	public boolean isAvailable() {
		return available;
	}

	public void setAvailable(boolean available) {
		this.available = available;
	}

	public Date getCreate_time() {
		return create_time;
	}

	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}

	public Date getModified_at() {
		return modified_at;
	}

	public void setModified_at(Date modified_at) {
		this.modified_at = modified_at;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	public String getRolename() {
		return rolename;
	}

	public void setRolename(String rolename) {
		this.rolename = rolename;
	}
	
}
